<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../css/myCenter.css">
    <link rel="stylesheet" type="text/css" href="../css/pages.css">

</head>

<body>
<div class="col-md-6 col-xs-11 nopadding" style="padding-top:3rem;padding-left: 3rem">
    <div class="table-responsive" id="showConfigDiv">

        <table class="table table-bordered table-hover" style="margin-top: 10px" id="configList">
            <tr>
                <th style="width: 100px">姓名</th>
                <th>身份证</th>
                <th>房间号</th>
            </tr>
        </table>
    </div>
</div>

</body>

</html>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript">
    var config;
    var htmlStr;
    $.ajax({
        type: "POST",
        url: "../log/getLogs",
        dataType: "JSON",
        data: {},
        success: function (data) {
            if (data.code == "0") {
                config = data.data;
                for (let i = 0; i < data.data.length; i++) {
                    htmlStr +=
                        "<tr>" +
                            "<td>" + config[i].name + "</td>" +
                            "<td>" + config[i].identityCard + "</td>" +
                            "<td>" + config[i].local + "</td>" +
                        "</tr>";
                }
                $("#configList").append(htmlStr);
            }

        },
        error: function () {
            alert("获取配置发生错误")
        }

    });
</script>
<!--<script type="text/javascript" src="../js/ad_salary.js"></script>-->
